import { rcaNumberFormat } from './common.js'
import { commonTableOption } from './common.js'
import { dateFormat } from '@/util/date';
export const startDate = dateFormat(new Date(), 'yyyy-MM-') + '01';
export const endDate = dateFormat(new Date(), 'yyyy-MM-dd');
export const tableOption = {
  ...commonTableOption,
  menu: true,
  editBtn: false,
  delBtn: false,
  selection: true,
  height:'400px',
  column: [{
    type: 'select',
    label: '线路',
    prop: 'lineCode',
    search: true,
    hide:true,
	searchValue: '9',
    searchLabelWidth: 100,
    cascaderItem: ['stationCode'],
    props: {
      label: 'name',
      value: 'code'
    },
    dicUrl: '/support/swparamline/dict',

  }, {
    type: 'select',
    label: '站点',
    prop: 'stationCode',
    search: true,
    searchLabelWidth: 100,
    props: {
      label: 'name',
      value: 'code'
    },
    dicFlag: false,
    dicUrl: `/support/swparamstation/dict/9`,
  },  {
    type: 'date',
    label: '交易日期',
    prop: 'tradeTime',  
    valueFormat: 'yyyy-MM-dd',    
    searchRange: false,
    search: true,
    width:120
  },{
    type: 'date',
    label: '入账开始日期',
    prop: 'entryStartTime',
    searchSpan: 12,
    searchRange: true,
    search: true,
    searchLabelWidth: 100,
    searchValue: [startDate, endDate],
    width:120,
    valueFormat: 'yyyy-MM-dd',
  }, {
    width:120,
    type: 'date',
    label: '入账结束日期',
    prop: 'entryEndTime',
  }, {
    width:120,
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '营收总金额',
    prop: 'cashReceiptsAmount'
  }, {
    width:120,
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '现金缴款金额',
    prop: 'amount'
  }, {
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '差异金额',
    prop: 'diffAmount'
  }, {
    type: 'select',
    label: '数据类型',
    prop: 'dataType',
    dicData: [
      {
        label: '银行单据数据录入',
        value: '1'
      }, {
        label: '长周期结算',
        value: '2'
      }
    ]
  }, {
    width:120,
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '补卸载金额',
    prop: 'supUnloadAmount',
    hide: true
  }, {
    width:120,
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '补短款金额',
    prop: 'cashShortAmount',
  }, {
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '补短款金额',
    prop: 'supShortAmount',
    hide: true
  }, {
    type: 'select',
    search: true,
    searchLabelWidth: 100,
    label: '操作状态',
    prop: 'executeStatus',
    dicData: [
      {
        label: '未操作',
        value: '0'
      }, {
        label: '已操作',
        value: '1'
      }
    ]
  }, {
    type: 'select',
    label: '差异条件',
    prop: 'diffCondition',	
    search: true,
	hide:true,
    dicData: [
       {
        label: '请选择',
        value: ''
      },
	  {
        label: '不等于0',
        value: '1'
      }, {
        label: '等于0',
        value: '0'
      }
    ]
  }]
}
